﻿using System.Windows;
using OMIP.HMS.WPFBusiness;
using OMIP.HMS.WPFBusiness.Command;
using System;
using System.Collections.Generic;

using System.Linq;
using OMIP.HMS.WPFBusiness.HMSServiceReference;


namespace OMIP.HMS.WPFBusiness.View
{
        /// <summary>
        /// 实现医护人员的属性和方法
        /// </summary>
        public class Employee :Entity<EmployeeModel>
        {
                /// <summary>
                /// 初始化<see cref="Employee"/>医护人员.
                /// </summary>
                /// <param name="model">医护人员模型</param>
                public Employee(EmployeeModel model)
                        : base(model)
                {
                        UpdateEmployeeCommand = UpdateEmployeeCommand.Instance;
                        DeleteEmployeeCommand = DeleteEmployeeCommand.Instance;
                }

                #region 常量

#pragma warning disable 1591

                public const string CompanySubName = "总公司";

                public const string SchoolSubName = "主医护人员";

#pragma warning restore 1591

                #endregion

                #region 基本属性



                /// <summary>
                /// 所属科室标识
                /// </summary>
                public string DepartmentId
                {
                        get
                        {
                                return Model.DepartmentId;
                        }
                }

                /// <summary>
                /// 名称
                /// </summary>
                public string Name
                {
                        get
                        {
                                return Model.Name;
                        }
                        set
                        {
                                Model.Name = value;
                                this.NotifyPropertyChanged(i=>i.Name);
                        }
                }

                /// <summary>
                /// 密码
                /// </summary>
                public string Password
                {
                        get
                        {
                                return Model.Password;
                        }
                        set
                        {
                                Model.Password = value;
                        }
                }

                

                #endregion 基本属性

                #region 扩展属性

                /// <summary>
                /// 科室名称
                /// </summary>
                public string DepartmentName
                {
                        get
                        {
                                return Model.DepartmentName;
                        }
                }

                
                #endregion 属性

                #region 命令

                public UpdateEmployeeCommand UpdateEmployeeCommand { get; private set; }

                public DeleteEmployeeCommand DeleteEmployeeCommand { get; private set; }

                #endregion
        }
}